<!--
 * Description: 报价专案查看页面
 * Company: 联宝（合肥）电子科技有限公司
 * Author: Dongxu.Ni
 * Date: 2020/03/31 07:26
-->

<template>
  <div style="padding-left:20px">
    <!--数据表单-->
    <el-form label-position="left" label-width="130px" :model="inputData" size="mini">
      <el-row>
        <el-col :span="12">
          <!--专案编号-->
          <el-form-item :label="$t('ProjectView.projectId')">
            <span>{{ inputData.projectId }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--专案名称-->
          <el-form-item :label="$t('ProjectView.projectName')">
            <span>{{ inputData.projectName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="$stringLength(inputData.projectDesc) > 30 ? 24 : 12">
          <!--专案描述-->
          <el-form-item :label="$t('ProjectView.projectDesc')">
            <span>{{ inputData.projectDesc }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--IDP的PM，域名-->
          <el-form-item :label="$t('ProjectView.pm')">
            <span>{{ inputData.pm }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--系列-->
          <el-form-item :label="$t('ProjectView.series')">
            <span>{{ inputData.series }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--BU类型 LNB/TNB/Server-->
          <el-form-item :label="$t('ProjectView.bu')">
            <span>{{ inputData.bu }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--PBM负责人-->
          <el-form-item :label="$t('ProjectView.pbmOwner')">
            <span>
              {{ $store.getters['user/getUserNameById'](inputData.pbmOwner) || $t('result.none') }}
            </span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--ME负责人-->
          <el-form-item :label="$t('ProjectView.meOwner')">
            <span>
              {{ $store.getters['user/getUserNameById'](inputData.meOwner) || $t('result.none') }}
            </span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--EE负责人-->
          <el-form-item :label="$t('ProjectView.eeOwner')">
            <span>
              {{ $store.getters['user/getUserNameById'](inputData.eeOwner) || $t('result.none') }}
            </span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--PKG负责人-->
          <el-form-item :label="$t('ProjectView.pkgOwner')">
            <span>
              {{ $store.getters['user/getUserNameById'](inputData.pkgOwner) || $t('result.none') }}
            </span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--是否已分配-->
          <el-form-item :label="$t('ProjectView.isAssigned')">
            <span>{{ $store.getters['dict/dictValue'](inputData.isAssigned) }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--创建人-->
          <el-form-item :label="$t('ProjectView.createUser')">
            <span>{{ $store.getters['user/getUserNameById'](inputData.createUser) }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--创建时间-->
          <el-form-item :label="$t('ProjectView.createTime')">
            <span>{{ inputData.createTime }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--修改人-->
          <el-form-item :label="$t('ProjectView.modifyUser')">
            <span>{{ $store.getters['user/getUserNameById'](inputData.modifyUser) }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <!--修改时间-->
          <el-form-item :label="$t('ProjectView.modifyTime')">
            <span>{{ inputData.modifyTime }}</span>
          </el-form-item>
        </el-col>

        <!-- 查看更多 -->
        <el-col :span="24">
          <BaseViewMore :visible.sync="isViewMore" />
        </el-col>

        <div v-if="isViewMore">
          <!--biz类型-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.bizType')">
              <span>{{ inputData.bizType }}</span>
            </el-form-item>
          </el-col>

          <!--customerName-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.customerName')">
              <span>{{ inputData.customerName }}</span>
            </el-form-item>
          </el-col>

          <!--项目详细设计开始时间-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.dds')">
              <span>{{ inputData.dds }}</span>
            </el-form-item>
          </el-col>

          <!--财务编码-->
          <el-col :span="$stringLength(inputData.financeCode) > 30 ? 24 : 12">
            <el-form-item :label="$t('ProjectView.financeCode')">
              <span>{{ inputData.financeCode }}</span>
            </el-form-item>
          </el-col>

          <!--代-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.generation')">
              <span>{{ inputData.generation }}</span>
            </el-form-item>
          </el-col>

          <!--model类型-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.modelType')">
              <span>{{ inputData.modelType }}</span>
            </el-form-item>
          </el-col>

          <!--成本中心-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.profitCenter')">
              <span>{{ inputData.profitCenter }}</span>
            </el-form-item>
          </el-col>

          <!--program-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.program')">
              <span>{{ inputData.program }}</span>
            </el-form-item>
          </el-col>

          <!--项目编码-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.projectNumber')">
              <span>{{ inputData.projectNumber }}</span>
            </el-form-item>
          </el-col>

          <!--项目类型-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.projectType')">
              <span>{{ inputData.projectType }}</span>
            </el-form-item>
          </el-col>

          <!--备注-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.remark')">
              <span>{{ inputData.remark }}</span>
            </el-form-item>
          </el-col>

          <!--项目推向市场时间-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.ss')">
              <span>{{ inputData.ss }}</span>
            </el-form-item>
          </el-col>

          <!--状态-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.state')">
              <span>{{ inputData.state }}</span>
            </el-form-item>
          </el-col>

          <!--tdmsName-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.tdmsName')">
              <span>{{ inputData.tdmsName }}</span>
            </el-form-item>
          </el-col>

          <!--teamLocation-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.teamLocation')">
              <span>{{ inputData.teamLocation }}</span>
            </el-form-item>
          </el-col>

          <!--系统版本-->
          <el-col :span="12">
            <el-form-item :label="$t('ProjectView.version')">
              <span>{{ inputData.version }}</span>
            </el-form-item>
          </el-col>
        </div>
      </el-row>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'ProjectDataLocalView',
  props: {
    inputData: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  data() {
    return {
      isViewMore: false
    }
  },
  computed: {},
  watch: {},
  created() {
    this.pageDataInit()
  },
  mounted() {},
  methods: {
    pageDataInit() {}
  }
}
</script>

<style scoped>
.el-form-item__content span {
  margin-left: 5px;
  color: blue;
}
</style>
